Programming Languages
-
-
For details about syntax and semantics, see Programming Languages.
The languages consist of these textual and graphical language versions:
Textual:
- Instruction List (IL "Instruction List" This is a low-level language and resembles assembly)
- Structured Text (ST "Structured text" A high-level language that is block structured and syntactically resembles Pascal)
Graphical
- Sequential Function A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. Chart (SFC "Sequential Function Chart" It can be used to program processes that can be split into steps. The main components of SFC are: - Steps with associated actions - Transitions with associated logic conditions - Directed links between steps and transitions)
- Free Form Ladder Diagram (FFLD "Free Form Ladder Diagram")
- Function Block A function block groups an algorithm and a set of private data. It has inputs and outputs. Diagram (FBD "Function Block Diagram" A function block diagram describes a function between input variables and output variables. A function is described as a set of elementary blocks)
All the languages are interlinked and provide a common suite. The choice of programming language depends on:
- the programmer's background
- the problem at hand
- the level of describing the problem
- the structure of the control system
- the interface to other people / departments
Sequential Function Chart
Sequential Function Chart (SFC) graphically describes the sequential behavior of a control program. It is derived from Petri Nets.
SFC organizes the internal structure of a program and helps to deconstruct a control problem into manageable parts, while maintaining the overview.
SFC consists of steps, linked with Action Blocks and Transitions.
- Each step represents a particular state of the systems being controlled.
- A transition is associated with a condition, which, when true, causes the step before the transition to be deactivated, and the next step to be activated.
- Steps are linked to action blocks, performing a specific control action.
- Each element can be programmed in any of the IEC languages, including SFC itself.
Alternative and Parallel Sequences
You can use alternative sequences and even parallel sequences, like those commonly required in batch applications.
Example: One sequence is used for the primary process and the second for monitoring the overall operating constraints.
In this image, parallel sequences are also possible:
Figure 9-1: Example of a Parallel Sequence in SFC
From Step 1, it either goes to Step 2a or Step 2b, depending on which of the transition conditions is met. Both conditions need to exclude each other.
Structured Text
Structured Text (ST) is a very powerful, high-level language with its roots in ADA, Pascal, and “C”. It contains all the essential elements of a modern programming language, including selection branches (IF-THEN-ELSE and CASE OF) and iteration loops (FOR, WHILE and REPEAT).
These elements can also be nested. It can be used for the definition of complex function blocks, which can be used within any of the other languages.
Function Block Diagram
Function Block Diagram (FBD) is very common to the process industry. It expresses the behavior of functions, function blocks, and programs as a set of interconnected graphical blocks, as in electronic circuit diagrams. It looks at a system in terms of the flow of signals between processing elements.
Free Form Ladder Diagram
Free Form Ladder Diagram (FFLD) is based on the graphical presentation of Relay Ladder Logic.
Instruction List
Instruction List (IL) is the European counterpart of FFLD. As textual language and looks like Assembler.